import Vue from 'vue'
import Router from 'vue-router'
import index from '@/views/index/index'
import home from '@/views/home/index.vue'
import login from '@/views/login.vue'
import subjectLearn from '@/views/subject-learn/index.vue'
import courseInfo from '@/views/subject-learn/courseInfo.vue'
import PatternCheck from '@/views/subject-learn/PatternCheck.vue'
import typeCheck from '@/views/subject-learn/typeCheck.vue'
import video from '@/views/subject-learn/video.vue'
import LearnContent3 from '@/views/subject-learn/LearnContent3.vue'
import LearnContent1 from '@/views/subject-learn/LearnContent1.vue'
import LearnContent2 from '@/views/subject-learn/LearnContent2.vue'
import WrongBook from '@/views/WrongBook/index.vue'
import Wrongs from '@/views/WrongBook/Wrongs.vue'
import WrongsInfo from '@/views/WrongBook/WrongsInfo.vue'
import IntelligentComments from '@/views/IntelligentComments/index.vue'
import LearningComments from '@/views/IntelligentComments/LearningComments/index.vue'
import eoid from '@/views/IntelligentComments/eoid/index.vue'
import Schoolcooperation from '@/views/Schoolcooperation/index.vue'
import about from '@/views/about/index.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      component: login,
      name: 'login',
    },
    { path: '/',
      component: index,
      name: 'index',
      redirect: {name: 'home'},
      meta: { title: '主入口' },
      children: [
        { path: '/home', component: home, name: 'home', meta: { title: '首页' } },
        { path: '/subjectLearn/:id', component: subjectLearn, name: 'subjectLearn', meta: { title: '课程学习' } },
        { path: '/WrongBook', component: WrongBook, name: 'WrongBook', meta: { title: '错题本' } },
        { path: '/Wrongs/:id', component: Wrongs, name: 'Wrongs', meta: { title: '错题本' } },
        { path: '/WrongsInfo/:id', component: WrongsInfo, name: 'WrongsInfo', meta: { title: '错题本' } },
        { path: '/courseInfo/:id', component: courseInfo, name: 'courseInfo', meta: { title: '科目选择' } },
        { path: '/PatternCheck/:id', component: PatternCheck, name: 'PatternCheck', meta: { title: '模式选择' } },
        { path: '/typeCheck', component: typeCheck, name: 'typeCheck', meta: { title: '选择模式' } },
        { path: '/LearnContent/3', component: LearnContent3, name: 'LearnContent3', meta: { title: '复习模式3' } },
        { path: '/LearnContent/1', component: LearnContent1, name: 'LearnContent2', meta: { title: '预习模式1' } },
        { path: '/LearnContent/2', component: LearnContent2, name: 'LearnContent1', meta: { title: '专题模式2' } },
        { path: '/IntelligentComments', component: IntelligentComments, name: 'IntelligentComments', meta: { title: '智能点评' } },
        { path: '/LearningComments', component: LearningComments, name: 'LearningComments', meta: { title: '学习点评' } },
        { path: '/eoid', component: eoid, name: 'eoid', meta: { title: '智能测评' } },
        { path: '/Schoolcooperation', component: Schoolcooperation, name: 'Schoolcooperation', meta: { title: '校企合作' } },
        { path: '/about', component: about, name: 'about', meta: { title: '关于我们' } },
        { path: '/video', component: video, name: 'video', meta: { title: '视频' } },
      ]
    }
  ]
})

